<ion-navbar *navbar class="my-navbar">
<!--   <ion-buttons start>
    <button (click)="toggleItems()">
      toggle
    </button>
  </ion-buttons> -->

  <ion-title>首页</ion-title>

<!--   <ion-buttons end>
    <button (click)="openModal()">
      Modal
    </button>
  </ion-buttons> -->

</ion-navbar>

<ion-content class="home">
  <button block dark (click)="doAlert()">Show Basic Alert</button>
  <button secondary block (click)="doPrompt()">Show Prompt Alert</button>
  <button block light (click)="doRadio()">Show Radio Alert</button>
	<div *ngIf="data">
		<ion-slides [style.height.rem]="slideHeight" pager loop="true" autoplay="true">
		  <ion-slide *ngFor="#item of data.adverts" (click)="onProductSelected(item.productId)">
		        <div class="slide-image" style="background-image:url('{{item.image | imgPath}}');">
		         <div class="slider-bar">
		             <div class="slider-bar-inner">
		                 <div class="text-ellipsis text-color-white">{{item.title}}</div>
		             </div>
		         </div>
		       </div>
		  </ion-slide>
		</ion-slides>
	    <product-list [products]="data.products" (selected)="onProductSelected($event)"></product-list>
	</div>
</ion-content>

<drop-menu *ngIf="data" [categories]="data.categories"></drop-menu>
